<?php

//$this->getServiceLocator()->get('db');
$dbParams = array(
		'dbname' => 'openrtb-php',
		'user'   => 'root',
		'pass'   => '',
		'host'   => 'localhost',
);

return array(
		'db' => array(
				'driver'         => 'Pdo',
                'dsn'            => 'mysql:dbname=' . $dbParams['dbname'] . ';host=' . $dbParams['host'],
                'username'       => $dbParams['user'],
                'password'       => $dbParams['pass'],
		),

		'service_manager' => array(
				'factories' => array(
						'Zend\Db\Adapter\Adapter' => function ($serviceManager) {
							$adapterFactory = new Zend\Db\Adapter\AdapterServiceFactory();
							$adapter = $adapterFactory->createService($serviceManager);

							\Zend\Db\TableGateway\Feature\GlobalAdapterFeature::setStaticAdapter($adapter);

							return $adapter;
						}
				),
		),

);
